package edu.hcmus.sow.dao;

import java.io.Serializable;
import java.util.List;

/**
 * The super class of Data Access Objects generated through the Spring DSL or scaffolding. This
 * class offers utility routines for quickly invoking queries and manipulating persistence objects.
 * 
 * @author Tony Phuong
 */
public interface GenericDAO<T extends Object, ID extends Serializable> {

   public T persist(T obj);

   public T merge(T obj);

   public void delete(T obj);

   public void refresh(T obj);

   public void flush();

   public T findById(ID id);

   public List<T> findAll();

}
